<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    var rate = Number(prompt('请输入每小时工资为多少元：'))
    var hour = Number(prompt('请输入本周工作的时间为多少小时：'))
    if (hour<=40){
        var a = rate * hour
        console.log('本周工资为' + a +'元')
    }else if(hour>40){
        var b = rate * 40 + (hour-40) * 1.5* rate
        console.log('本周工资为' + b +'元')
    }
</script>
</html>